import request from '@/utils/request'

// 获取海关类别分页列表
export function pagingCustomsCategory(query) {
  return request({
    url: '/system/customsCategory/paging',
    method: 'get',
    params: query
  })
}
// 获取海关类别列表
export function getCustomsCategoryList(query) {
  return request({
    url: '/system/customsCategory/getCustomsCategoryList',
    method: 'get',
    params: query
  })
}

// 删除海关类别
export function deleteCustomsCategory(configId) {
  if (!configId) {
    return false
  }
  return request({
    url: '/system/customsCategory/delete',
    method: 'get',
    params: {
      configId
    }
  })
}

// 保存海关类别，传复杂对象，参数用data
export function saveCustomsCategory(customsCategory) {
  return request({
    url: '/system/customsCategory/save',
    method: 'post',
    data: customsCategory
  })
}
